<extend name="Public:list_layout" />
<block name="title"><title>字段管理</title></block>
<block name="subnav">
  <a class="add fb" href="__CONTROLLER__/add"><em>添加模型</em></a>　    <a class="on" href="__CONTROLLER__/index"><em>模型管理</em></a>
</block>
<block name="main">
  <form name="myform" id="myform" action="" method="post">
    <div class="table-list">
      <table width="100%" cellspacing="0">
        <thead>
          <tr>
            <th width="5%" align="left">ID</th>
            <th width="15%">模型名称</th>
            <th width="15%">模型表名</th>
            <th width="15%">分类名称</th>
            <th>描述</th>
            <th width="20%">管理操作</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach ($models as $key => $model) { ?>
          <tr>
            <td width="5%" align="left"><?php echo $model['id']; ?></td>
            <td width="15%" align="center"><?php echo $model['name']; ?></td>
            <td width="15%" align="center"><?php echo $model['tablename']; ?></td>
            <td width="15%" align="center"><?php echo $types[$model['typeid']] ? $types[$model['typeid']] : '默认分类'; ?></td>
            <td align="center"><?php echo $model['description']; ?></td>
            <td width="20%" align="center">
              <a href="__MODULE__/ModelField/index?modelid=<?php echo $model['id']; ?>">字段管理</a> |
              <a href="__CONTROLLER__/edit?modelid=<?php echo $model['id']; ?>">修改</a> |
              <a href="javascript:confirmurl('__CONTROLLER__/delete?modelid=<?php echo $model['id']; ?>', '是否删除?')">删除</a>
            </td>
          </tr>
          <?php } ?>
        </tbody>
      </table>
    </div>
    <div id="pages"><?php echo $pages; ?></div>
  </form>
</block>